<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2018/12/19
 * Time: 21:14
 */
namespace common\sources\write\businessrechargerecord;

use Yii;

class BusinessRechargeRecordAccess implements IBusinessRechargeRecordAccess
{
    //
    public function addRechargeRecord($data){
        return Yii::$app->db->createCommand()->insert('business_recharge_record', [
            'bus_id' => $data['bus_id'],
            'amount' => isset($data['amount']) ? $data['amount'] : '',
            'rech_type' => 2,
            'status' => $data['pay_status'],
            'order_id' => $data['order_id'],
            'pay_type' => $data['pay_type'],
            'shop_name' => $data['shop_name'],
            'remark' => $data['remark'],
            'create_time' => time()
        ])->execute();
    }
}